import 'dart:convert';

import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/violation_entity.g.dart';
export 'package:enterprise_v6_app/generated/json/violation_entity.g.dart';

@JsonSerializable()
class ViolationEntity {
  ViolationEntity();

  factory ViolationEntity.fromJson(Map<String, dynamic> json) => $ViolationEntityFromJson(json);

  ///	企业编码
  String? companyCode = '';

  ///	创建人
  String? createBy = '';

  ///	创建时间
  String? createDate = '';

  ///	主键ID
  String? id = '';

  ///	作业计划ID
  String? ticketPlanId = '';

  ///	作业票ID
  String? ticketReceiptId = '';

  ///	修改人
  String? updateBy = '';

  ///	修改时间
  String? updateDate = '';

  ///	违规回执列表
  List<ViolationViolationListDTOList>? violationListDTOList = [];

  ///	违规理由
  String? violationReason = '';

  ///	违规类型字典ID
  String? violationTypeId = '';

  ///	违规类型字典名称
  String? violationTypeName = '';

  Map<String, dynamic> toJson() => $ViolationEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class ViolationViolationListDTOList {
  ViolationViolationListDTOList();

  factory ViolationViolationListDTOList.fromJson(Map<String, dynamic> json) =>
      $ViolationViolationListDTOListFromJson(json);

  ///	回执内容
  String? violationCircle = '';

  ///	回执附件
  List<String>? violationCircleFile = [];

  Map<String, dynamic> toJson() => $ViolationViolationListDTOListToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
